#include "ch03.h"
char buf1[] = "abcdefghij";
char buf2[] = "0123456789";
int main(void)
{
	int fd;
	if(fd = open("file.hole", O_WRONLY|O_CREAT, 0644) < 0)
	{
		err_exit("create error");
	}
	if(write(fd, buf1, 10) != 10)
	{
		err_exit("buf1 write error!");
	}
	if(write(fd, buf2, 10) != 10)
	{
		err_exit("lseek error");
	}
	if(write(fd, buf2, 10) != 10) 
	{
		err_exit("buf2 write error");
	}
	exit(0);
	
}
